﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HNPL.Sockets;

namespace ServerDemo
{
    class Program
    {
        static UdpCookie cookie = new UdpCookie(5);

        static void p_received(object sender, UdpCookiePiece e)
        {
            cookie.AddPiece(e);
        }

        static void c_received(object sender, UdpCookie e)
        {
            
        }

        static void Main(string[] args)
        {
            UdpSocketTool tool = UdpSocketTool.CreateServerTool(5568);
            tool.UdpPacketReceived += p_received;
            tool.BeginToListen();
            int i = 0;
            while (true)
            {
                i++;
                i--;
            }
        }
    }
}
